package com.lzf.yh.controller;

import com.lzf.yh.commons.JsonBean;
import com.lzf.yh.entity.Message;
import com.lzf.yh.userService.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: Wyz
 * @Date: 2021/5/24 21:22
 * @Description:
 */
@RestController
public class MessageController {

    @Autowired
    private MessageService messageService;


    @PostMapping("insertMessage")
    public JsonBean insertMessage(Message message) {
        return  messageService.insertMessage(message);
    }

    @GetMapping("selectAllMessage")
    public JsonBean selectAllMessage(String guitarinfoname) {
        return messageService.selectAllMessage(guitarinfoname);
    }

}
